{% extends "base.html" %}
{% block content %}
<h2>Medicine Inventory</h2>
<table>
<tr>
  <th>ID</th>
  <th>Name</th>
  <th>Dosage</th>
  <th>Stock</th>
</tr>
{% for m in medicines %}
<tr>
  <td>{{ m.medicine_id }}</td>
  <td>{{ m.name }}</td>
  <td>{{ m.dosage }}</td>
  <td>{{ m.stock }}</td>
</tr>
{% endfor %}
</table>

<h3>Add New Medicine</h3>
<form action="{{ url_for('medicine_new') }}" method="post">
  Name: <input name="name">
  Dosage: <input name="dosage">
  Stock: <input name="stock" type="number" min="0">
  <button type="submit">Add</button>
</form>
{% endblock %}
